home *** CD-ROM | disk | FTP | other *** search
- package sun.awt;
-
- import java.nio.charset.Charset;
- import java.nio.charset.CharsetDecoder;
- import java.nio.charset.CharsetEncoder;
-
- public class AWTCharset extends Charset {
- protected Charset awtCs;
- protected Charset javaCs;
-
- public AWTCharset(String var1, Charset var2) {
- super(var1, (String[])null);
- this.javaCs = var2;
- this.awtCs = this;
- }
-
- public boolean contains(Charset var1) {
- return this.javaCs == null ? false : this.javaCs.contains(var1);
- }
-
- public CharsetEncoder newEncoder() {
- if (this.javaCs == null) {
- throw new Error("Encoder is not supported by this Charset");
- } else {
- return new Encoder(this, this.javaCs.newEncoder());
- }
- }
-
- public CharsetDecoder newDecoder() {
- if (this.javaCs == null) {
- throw new Error("Decoder is not supported by this Charset");
- } else {
- return new Decoder(this, this.javaCs.newDecoder());
- }
- }
- }
-